import { request } from '@/service/request';

/** 获取容器管理列表 */
export function fetchGetContainerList (params?: Api.System.ContainerSearchParams) {
    return request<Api.System.ContainerList>({
        url: '/system/container/list',
        method: 'get',
        params
    });
}

/** 新增容器管理 */
export function fetchCreateContainer (data: Api.System.ContainerOperateParams) {
    return request<boolean>({
        url: '/system/container',
        method: 'post',
        data
    });
}

/** 修改容器管理 */
export function fetchUpdateContainer (data: Api.System.ContainerOperateParams) {
    return request<boolean>({
        url: '/system/container',
        method: 'put',
        data
    });
}

/** 批量删除容器管理 */
export function fetchBatchDeleteContainer (ids: CommonType.IdType[]) {
    return request<boolean>({
        url: `/system/container/${ids.join(',')}`,
        method: 'delete'
    });
}
